<%@ page language="java" contentType="text/html; charset=utf-8" errorPage="/404.jsp" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>房屋信息管理-房屋详情</title>
    <style type="text/css">
        @import url("<c:url value='/css/main.css'/>");
    </style>
</head>


<body>
<div class="div_main">
    <div class="div_header">修缮信息-修缮详情</div>
    <h1 align="center">
        <a href="${pageContext.request.contextPath}/repairlog/list.action">
            返回首页
        </a>
    </h1>
    <c:if test="${not empty repairlog}">
        <div class="div_data">
            <table class="tab_list">
                <tr>
                    <th>编号</th>
                    <th>工作人员编号</th>
                    <th>房屋编号</th>
                    <th>开始修复的时间</th>
                    <th>结束修复的时间</th>
                    <th>记录详情</th>
                    <th>修复状态</th>


                    <th>操作</th>
                </tr>
                <tr>

                    <td>${repairlog.rid}</td>
                    <td>${repairlog.wid}</td>
                    <td>${repairlog.hid}</td>
                    <td>${repairlog.rstarttime}</td>
                    <td>${repairlog.rendtime}</td>
                    <td>${repairlog.rcontent}</td>
                    <td>${repairlog.rstatus}</td>


                    <td>

                        <a href="${pageContext.request.contextPath}/repairlog/getOne.action?id=${repairlog.rid}&method=update">编辑</a>

                        &nbsp;&nbsp;
                        <a href="#" onclick="confirmDelete(${repairlog.rid})">删除</a>
                    </td>
                </tr>
                <script>
                    function confirmDelete(id) {
                        if (confirm("确定要删除码？")) {
                            window.location = "${pageContext.request.contextPath}/repairlog/deleteOne.action?id=" + id;
                            // 重定向
                        }
                        return false;
                    }
                </script>

            </table>
        </div>
    </c:if>


</div>
</body>
</html>

